<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
	<meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="">
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
	
	<script src="js/jquery-1.10.2.js"></script>
	<script src="js/jquery-ui-1.10.3.js"></script>
  	<script src="js/bootstrap.js"></script>
		
    <!-- Le styles -->
    <link href="css/bootstrap.css" rel="stylesheet">    
    <link href="css/bootstrap-responsive.css" rel="stylesheet">
	<link href="css/bootswatch.css" rel="stylesheet">
    <link href="css/jquery-ui-1.10.3.css" rel="stylesheet">
    
	<title>Karaoke</title>
</head>
<body>	
	
				<!-- INICIO DEL MENU PRINCIPAL -->
	    <div class="navbar navbar-inverse navbar-fixed-top">
	      <div class="navbar-inner">
	        <div class="container">
	          <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
	            <span class="icon-bar"></span>
	            <span class="icon-bar"></span>
	            <span class="icon-bar"></span>
	          </a>
	          <a class="brand" href="#">Karaoke</a>
	          <div class="nav-collapse collapse">
	            <ul class="nav">
					<li class="active"><a href="#">Home</a></li>
	              <li><a href="ReservaBuscar.jsp">Reservas</a></li>
	              <li><a href="ProductoBuscar.jsp">Productos</a></li>
	              <li><a href="LocalBuscar.jsp">Locales</a></li>
	              <li><a href="SalaBuscar.jsp">Salas</a></li>
	              <li><a href="EventoBuscar.jsp">Eventos</a></li>
	              <li><a href="ComprobanteBuscar.jsp">Comprobante</a></li>
	            </ul>
	          </div>
	        </div>
	      </div>
	    </div>
		<!-- FIN DEL MENU PRINCIPAL -->

	<div>
	<br>
	<br>
	<br>
		
	<fieldset class="form-horizontal well">
		
		<form id="form1" name="form1" method="post" action="ReservaServlet?Param=insertar">	
	
		<%@page import="java.util.*, pe.edu.upc.karaoke.modelo.*" %>
		
		<h3>Nueva Reserva</h3>
		Fecha:	<input id="txtFecha" name="txtFecha" type="date" required autofocus/>
		<br/>
		
		<!-- 
		Hora:	<input id="txtHora" name="txtHora" type="time"/>
		<br/>
		 -->
		
		Descripci&oacute;n: <input id="txtDescripcion" name="txtDescripcion" type="text" required autofocus/>
		<br/>
		
		Sala:
		<br/>
		<%
		List<Sala> lista = (ArrayList<Sala>)request.getAttribute("salas");
		if(lista != null) { 
		int i = 1;
		%>
		<select name="listaSala" id="listaSala">
			<%for(Sala x : lista) {%>  
			  <option value=<%out.print(x.getIdsala());%>><%out.print(x.getNombre());%></option>
			<% } %> 
		</select>
		<% } %>
  		<br/>
  		Cliente:
		<br/>
  		<%
		List<Cliente> listaCliente = (ArrayList<Cliente>)request.getAttribute("clientes");
		if(lista != null) { 
		int i = 1;
		%>
		<select name="listaCliente" id="listaCliente">
			<%for(Cliente x : listaCliente) {%>  
			  <option value=<%out.print(x.getIdCliente());%>><%out.print(x.getNombre());%></option>
			<% } %> 
		</select>
		<% } %>
  		<br/>
  		
  		<button id="botonEnviar" type="submit" class="btn">Enviar</button>		
		<p/>&nbsp;	
		
		</form>
	</fieldset>
	</div>
	
</body>
</html>